import configparser as cp
#配置文件路径
filename = ".\config.ini"

#配置文件读入
i = cp.ConfigParser()
i.read(filename,'utf-8')

#读取快
print('db.ip = ',i.get('db','ip'))
